package com.lms.thread.demo2;


import com.lms.generictype.demo3.Person;

/**
 * @Author: 李孟帅
 * @CreateTime: 2020-01-17 15:10
 * @Description: //访问共享变量，线程不安全
 */
public class Test {
    public static void main(String[] args) throws InterruptedException {
        SynchronizedTest synchronizedTest = new SynchronizedTest();
        Task task = new Task(synchronizedTest);
        task.start();
        Task task1 = new Task(synchronizedTest);
        task1.start();
        TaskB taskB = new TaskB(synchronizedTest);
        taskB.setName("Thread-B");
        taskB.start();


    }
}
